<?php
namespace app\admin\model;

use think\Model;
use think\Db;


class Wenjuan extends Model
{
    protected $pk = 'b_id';
    protected $table = 'xc_answer';
    
    
    //获取器： 
	public function getTypetitleAttr($value,$data){
		//$title = Db::name('Type')->where('type_id='.$data['type_id'])->value('title');
        //return $title?$title:'';
	}
    
    //搜索器
    
    public function searchTitleAttr($query, $value){
        
       if ($value) {
            $query->where('company', 'like', '%' . $value . '%');
        } 
        
    }
    
}


?>